package com.ponhu.ea2.goodsCenter.provider.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ponhu.ea2.dto.GoodsInfoDto;
import com.ponhu.ea2.dto.PhInventoryGoodsEditDto;
import com.ponhu.ea2.entity.Goods;
import com.ponhu.ea2.vo.GoodsInfoVo;
import com.ponhu.ea2.vo.InventoryBatchEditPriceVo;
import com.ponhu.ea2.vo.InventoryVo;
import com.ponhu.ea2.vo.PhInevntoryGoodsDetailVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Entity generator.domain.Goods
 */
public interface GoodsMapper extends BaseMapper<Goods> {

    /**
     * 前端页面订单详情查询商品详情
     *
     * @param goodsIds 商品ID集合
     * @return
     */
    List<GoodsInfoDto> getGoodsInfoForWebOrder(List<Long> goodsIds);

    /**
     * 根据货品ID查询货品相关商品信息
     *
     * @return
     */
    PhInevntoryGoodsDetailVo getGoodsForInventoryVoById(Long inventoryId);

    /**
     * 前端页面查询商品详情
     *
     * @param code 商品code集合
     * @return
     */
    GoodsInfoVo getGoodsInfoByCode(String code);

    /**
     * 货品及商品批量改价
     *
     * @param editPriceVoList
     * @return
     */
    void batchUpdateGoodsPrices(@Param("editPriceVoList") List<InventoryBatchEditPriceVo> editPriceVoList);

    List<PhInventoryGoodsEditDto> getGoodsEditDtoByInventoryCodes(@Param("inventoryCodes") List<String> inventoryCodes);

}




